import initState from '../states'
import methods from '../methods';
export default (state = initState, { type, data }) => {
    try {
        return methods[type](state, data)
    } catch (error) {
        return state;
    }
}